<html>

<head>
<title>Learning WebGL &mdash; lesson 15</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
    #loadingtext {
        position:absolute;
        top:250px;
        left:150px;
        font-size:2em;
        color: white;
    }
</style>

<link href="../lessons.css" type="text/css" rel="stylesheet" media="screen" />
<script type="text/javascript" src="../../../build/PhiloGL.js"></script>
<script type="text/javascript" src="index.js"></script>
</head>

<body onload="webGLStart();">
  <canvas id="lesson15-canvas" style="border: none;" width="500" height="500"></canvas>
  <script src="https://gist.github.com/818033.js"> </script>
  <br/>
<input type="checkbox" id="color-map" checked /> Show color map<br/>
<input type="checkbox" id="specular-map" checked /> Show specular map<br/>
<input type="checkbox" id="lighting" checked /> Use lighting<br/>

<h2>Point light:</h2>
<table style="border: 0; padding: 10px;">
<tr>
<td><b>Location:</b>
<td>X: <input type="text" id="lightPositionX" value="-10.0" />
<td>Y: <input type="text" id="lightPositionY" value="4.0" />
<td>Z: <input type="text" id="lightPositionZ" value="-20.0" />
</tr>
<tr>
<td><b>Specular colour:</b>
<td>R: <input type="text" id="specularR" value="5.0" />
<td>G: <input type="text" id="specularG" value="5.0" />
<td>B: <input type="text" id="specularB" value="5.0" />
</tr>
<tr>
<td><b>Diffuse colour:</b>
<td>R: <input type="text" id="diffuseR" value="0.8" />
<td>G: <input type="text" id="diffuseG" value="0.8" />
<td>B: <input type="text" id="diffuseB" value="0.8" />
</tr>
</table>

<h2>Ambient light:</h2>
<table style="border: 0; padding: 10px;">
<tr>
<td><b>Colour:</b>
<td>R: <input type="text" id="ambientR" value="0.4" />
<td>G: <input type="text" id="ambientG" value="0.4" />
<td>B: <input type="text" id="ambientB" value="0.4" />
</tr>
</table>

<br/>
Galvanized texture courtesy of <a href="http://www.arroway-textures.com/">Arroway Textures</a>.<br/>
Earth texture courtesy of <a href="http://www.esa.int/esaEO/SEMGSY2IU7E_index_0.html">the European Space Agency/Envisat</a>.<br/>
<br/>

  <a href="http://learningwebgl.com/blog/?p=1658">&lt;&lt; Back to Lesson 15</a><br />
</body>

</html>
